
<link href="<tpl> $template_dir </tpl>/member/css/shop.manage.css" rel="stylesheet" type="text/css" />

<div id="container760" style="width:auto">
  <DIV id="PostMethods" style="width:700px;background:none; background-color:#fff; padding-bottom:20px">
    <DIV id="PutMerchandise" style="background:none; background-color:#fff" ><A href="#" name="Buynow" id="Buynow" style="padding-left:10px; padding-right:10px" onclick="$('#Selltype').val('1');$(this).addClass('selected').next().removeClass('selected')">
      <DIV class="PostCardStyle2" >
        <DIV class="Icon"><IMG alt="icon" src="http://pics.taobao.com/bao/album/sys/auction/sell_icon_buynow01.gif" /></DIV>
        <DIV class="Paragraph" style="margin-left:10px; padding-left:10px">
          <P class="G" style="font-weight:normal; font-size:12px"><tpl> $langSysSetFastnessPrice </tl><BR />
            <tpl> $langSysBuyOnce </tpl></P>
        </DIV>
        <DIV class="Button"><tpl> $langSysPriceSend </tpl></DIV>
      </DIV>
      </A><A href="#" id="Group" onclick="$('#Selltype').val('2');$(this).addClass('selected').prev().removeClass('selected')" style="padding-left:10px; padding-right:10px">
      <DIV class="PostCardStyle2">
        <DIV class="Icon"><IMG alt="icon" src="http://pics.taobao.com/bao/album/sys/auction/sell_icon_group01.gif" /></DIV>
        <DIV class="Paragraph" style="margin-left:10px; padding-left:10px">
          <P class="G" style="font-weight:normal; font-size:12px;"><tpl> $langSysSetLastNumGroupPrice </tpl><BR />
            <tpl> $langSysBuyGroupBuy </tpl></P>
        </DIV>
        <DIV class="Button"><tpl> $langSysGrupSend </tpl></DIV>
      </DIV>
    </A> </DIV>
  
  </DIV>
  <div id='aa' style="padding:0px; width:100%; display:block">
    <ul id="select_first" class="select02" style="list-style:none; float:left; margin:0px">
      <tpl> section name=i loop=$top_cate </tpl>
      <LI class="<tpl> if $top_cate[i].haveson == 1 </tpl>IsFather<tpl> /if </tpl>" id="<tpl> $top_cate[i].id </tpl>" ><tpl> $top_cate[i].name </tpl></LI>
      <tpl> /section </tpl>
    </ul>
    <ul id="select_second" class="select02" style="margin:3px;width:21%">
    </ul>
    <ul id="select_third" class="select02" style="margin:3px;width:21%">
    </ul>
    <ul id="select_fourth" class="select02" style="margin:3px; width:20%">
    </ul>
  </div>
  <div class="HackBox"></div>
 <form action="product.manage.php" name="form1" id='form1' method="post" onsubmit="return ajax_modi();"  >
 	<input type="hidden" name="action" value="modi" />
	<input type="hidden" name="pid" value="<tpl> $pid </tpl>" />
    <DIV id="NowSelected" style="width:auto; float:left; display:block"><tpl> $langSysOnceSelectIs </tpl>：<SPAN id="NowSelectedResult"></SPAN>
      <input id="Selltype" name="Selltype" type="hidden" value="">
      <input id="select_cate_id" name="select_cate" type="hidden" value="">
      <input id="select_all_id" name="select_all" type="hidden" value="">
      <DIV id="BlebBox"></DIV>
    </DIV>
    <div style="margin-top:10px; text-align:right">
      <input type="submit" name="submit" value="<tpl> $langCNext </tpl>">
    </div>
  </form>
</div>





<tpl>include file ='../../../js/validate/member_product.sell.html'</tpl>
<script type="text/javascript">
$(document).ready(function(){
	<tpl> if $list_class_error != '' </tpl>
	//输出后台程序错误信息
	showMessage(<tpl> $list_class_error </tpl>);
	<tpl> /if </tpl>
});
	function addgray(){
		$('.select02').each(function(){
			if ($(this).find('li').length=='0'){$(this).css('background','#eee')}else{$(this).css('background','')}
		})
	};
	function tonext(whos) {
		$(whos).find('li').click(
			function(){			
				$(whos).find('li').removeClass('Selected');
				$(this).addClass('Selected');
				if ($(this).hasClass('IsFather')) {
					$(whos).next().html('<li><tpl> $langCDataToLoading </tpl></li>');
					$.get('../member/own_productcate.php',{action:'list',id:$(this).attr('id'),random_number:Math.random()},function(data){
						DataArray = data.split("|||");var a='';for (var i = 0; i<DataArray.length-1; i++) {att=DataArray[i].split("||");id=att[0];var cla="";if ('1'==att[2]) {cla="IsFather"};a+='<li id='+id+' class='+cla+'>'+att[1]+'</li>';};
						$(whos).next().html(a).css('background','').nextAll().html('').css('background','#eee');tonext('#'+$(whos).next().attr('id'));
						writeselected();
				})} else {$(whos).nextAll().html('').css('background','#eee');writeselected()};
		})
	};
	function writeselected(){
		a=$(".select02 li.Selected").map(function(){return $(this).html();}).get().join(" &gt; ") ;
		b=$(".select02 li.Selected").map(function(){return $(this).attr('id');}).get().join("|") ;
		$('#NowSelectedResult').html(a);
		$.cookie('saveselect', b);
		c=$(".select02 li.Selected:last").attr('id');
		$("#select_cate_id").val(c);
		$("#select_all_id").val(b);
	}
	$().ready(function() {
		addgray();tonext('#select_first');
	});
	
	//跳转到商品编辑页面
	function ajax_modi(){
		/* 取表单参数 */var queryString=$("#form1").formSerialize();
	
		$.ajax({
			url: "product.manage.php",
			data: queryString,
			type:'post',
			dataType:"html",
			beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
			success: function(msg){
				hideLoading();
				$('#result_content').html(msg);
			}
		});
		return false;
	}
</script>